//
//  SecurityHearder.h
//  LocomotiveGuards
//
//  Created by apple on 15/11/17.
//  Copyright (c) 2015年 REDOOR. All rights reserved.
//


//主要用于防止重复定义宏和重复包含头文件
#ifndef LocomotiveGuards_SecurityHearder_h
#define LocomotiveGuards_SecurityHearder_h

#define MESSAGE_DATELABEL_HEIGHT        SCREEN_HEIGHT*0.05//消息列表日期控件高度
#define MESSAGE_MESSAGELABEL_TEXT_FRONT    [UIFont systemFontOfSize:12]
#define MESSAGE_MESSAGEICON_SIZE        SCREEN_HEIGHT*0.03

#define SECURITY_MESSAGE_REFRESH_NOTIFICATION    @"security_message_refresh_notification"

/*
    一键防护状态:开启/关闭/正在从服务器查询状态
 */
typedef NS_ENUM(NSInteger, AlarmState)
{
    AlarmStateOn    = 0,
    AlarmStateOff   = 1,
    AlarmStateNull  = 2     //表示正在从服务器查询状态
};

/*
    安全状态: 自动显示/手动查询
 */
typedef NS_ENUM(NSInteger, SecurityState)
{
    SecurityStateYellow    = 0,//橘黄色为根据服务器状态自动显示(定时刷新)
    SecurityStateBlue      = 1 //手动查询对应的状态
};

/*
    异常状态
 */


typedef NS_ENUM(NSInteger, SecurityAbnormalStatus)
{
    SecurityAbnormalStatusNormal              = 0, //正常
    SecurityAbnormalStatusIllegalDisplacement = 1, //非法位移
    SecurityAbnormalStatusVibration           = 2, //振动
    SecurityAbnormalStatusLock                = 3, //锁定
};

/*
    低电状态
 */
typedef NS_ENUM(NSInteger, SecurityLowPowerStatus)
{
    SecurityLowPowerStatusNormal       = 0, //正常
    SecurityLowPowerStatusLowPower     = 1, //低电量
    SecurityLowPowerStatusinterrupt    = 2, //断电
};

/*
    剪断报警状态
 */
typedef NS_ENUM(NSInteger, SecurityCutStatus)
{
    SecurityCutStatusNormal       = 0, //正常(未剪断)
    SecurityCutStatusCutted       = 1, //剪断
};

/*
    电子围栏状态
 */
typedef NS_ENUM(NSInteger, SecurityElecFenceStatus)
{
    SecurityElecFenceStatusNormal       = 0, //正常
    SecurityElecFenceStatusOutofBounds  = 1, //越界
};

/*
    故障消息类型
 */
typedef NS_ENUM(NSInteger, AlarmMessageType)
{
    AlarmMessageTypeAbnormal            = 12, //异常状态
    AlarmMessageTypeLowPower            = 11, //低电报警
    AlarmMessageTypeCut                 = 21, //剪断报警
    AlarmMessageTypeElecFence           = 31, //电子围栏
    AlarmMessageTypeIllegalDisplacement = 1, //非法位移
    AlarmMessageTypeIllegalVibration    = 2, //震动
    AlarmMessageTypeIllegalLock         = 3, //锁定
};

#endif
